package homework0307;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class CopyDemo3 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis=new FileInputStream("11.jpg");
        FileOutputStream fos=new FileOutputStream("11_cp.jpg");
        int len;
        byte[] date=new byte[1024*10];
        long start=System.currentTimeMillis();
        while ((len=fis.read(date))!=-1){
            fos.write(date,0,len);
        }
        long end=System.currentTimeMillis();
        System.out.println("复制完成，耗时"+(end-start));
        fis.close();
        fos.close();



    }
}
